package com.arsn.myf.system.entity;

import com.arsn.myf.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 用户表对象
 *
 * @author zhongrj
 * @date 2022-12-12 20:18:42
 */
@Data
@TableName("sys_user")
@ApiModel(value = "User对象", description = "User对象")
public class User extends BaseEntity implements Serializable{

    private static final long serialVersionUID = 1L;

    /**
    * 主键
    */
    @TableId(value = "id",type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
    * 用户编号
    */
    @ApiModelProperty(value = "用户编号")
    private String code;

    /**
    * 用户平台  1:web  2: app 3:微信小程序
    */
    @ApiModelProperty(value = "用户平台  1:web  2: app 3:微信小程序")
    private Integer userType;

    /**
    * 账号
    */
    @ApiModelProperty(value = "账号")
    private String account;

    /**
    * 密码
    */
    @ApiModelProperty(value = "密码")
    private String password;

    /**
    * 昵称
    */
    @ApiModelProperty(value = "昵称")
    private String nickName;

    /**
    * 真名
    */
    @ApiModelProperty(value = "真名")
    private String realName;

    /**
    * 头像
    */
    @ApiModelProperty(value = "头像")
    private String avatar;

    /**
    * 邮箱
    */
    @ApiModelProperty(value = "邮箱")
    private String email;

    /**
    * 手机
    */
    @ApiModelProperty(value = "手机")
    private String phone;

    /**
    * 生日
    */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ApiModelProperty(value = "生日")
    private Date birthday;

    /**
    * 性别   1：男    2：女
    */
    @ApiModelProperty(value = "性别   1：男    2：女")
    private Integer sex;

    /**
    * 部门id
    */
    @ApiModelProperty(value = "部门id")
    private String deptId;

    /**
    * 角色id
    */
    @ApiModelProperty(value = "角色id")
    private String roleId;

    /**
    * 岗位id
    */
    @ApiModelProperty(value = "岗位id")
    private String postId;

    /**
    * 创建部门
    */
    @ApiModelProperty(value = "创建部门")
    private Long createDept;

    /**
    * 状态
    */
    @ApiModelProperty(value = "状态")
    private Integer status;

    /**
    * 是否删除  0 否    1 是
    */
    @ApiModelProperty(value = "是否删除  0 否    1 是")
    @TableLogic
    private Integer isDeleted;

}
